package yf.mall.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import yf.mall.entity.ArticleEntity;
import yf.mall.vo.ArticleVo;
import org.apache.ibatis.annotations.Mapper;
import com.yf.dao.BaseDao;
import java.util.List;
/**
 * 文章Dao
 *
 *
 *
 * @date Wed Aug 02 10:54:31 CST 2023
 */
@Mapper
public interface ArticleDao extends BaseDao<ArticleEntity> {

    List<ArticleVo> findVo(ArticleVo vo);

    ArticleVo getVo(Long id);


    @Select("select * from article where type = #{type} and status = #{status} order by sort")
    List<ArticleEntity> findByTypeAndStatus(@Param("type") int type, @Param("status") int status);
}
